<?php $this->pageTitle     = ' Đăng ký tham quan' . '-' . Option::getItem('site_name'); ?>
<?php
$this->meta_desc     = 'Đăng ký tham quan';
$this->meta_keywords = 'Đăng ký tham quan';
?>
<div class="content">
    <div class="main-wrap">
        <div class="colum-right fl product-hl">
            <br>
            <?php
            $form                = $this->beginWidget('CActiveForm', array(
                'id'                     => 'Register-Form',
                'enableClientValidation' => true,
                'htmlOptions'            => array(
                    'class' => 'form-horizontal'
                )
            ));
            ?>
            <?php if (Yii::app()->user->hasFlash('contact-success')): ?>
                <div class="alert alert-info"><?php echo Yii::app()->user->getFlash('contact-success'); ?> </div>
            <?php endif; ?>
            <?php if (Yii::app()->user->hasFlash('contact-err')): ?>
                <div class="alert alert-error"><?php echo Yii::app()->user->getFlash('contact-err'); ?> </div>
            <?php endif; ?>
            <div class="control-group">
                <label class="control-label" for="inputDate">Dự án:</label>
                <div class="controls">
                    <div class="title-project">
                        <?php echo $product->name ?>
                    </div>
                </div>
            </div>
            <div class="control-group">
                <?php
                echo $form->labelEx($model, 'register_day', array(
                    'class' => 'control-label',
                ));
                ?>
                <div class="controls">
                    <?php
                    echo $form->textField($model, 'register_day', array(
                        'placeholder' => $model->getAttributeLabel('register_day'),
                        'class'       => 'span3 datepicker',
                        'readonly'    => 'readonly'
                    ));
                    ?>
                </div>
                <font><?php echo $form->error($model, 'register_day', array('class' => 'err')); ?></font>
            </div>
            <div class="control-group">
                <?php
                echo $form->labelEx($model, 'email', array(
                    'class' => 'control-label',
                ));
                ?>
                <div class="controls">
                    <?php
                    echo $form->textField($model, 'email', array(
                        'placeholder' => $model->getAttributeLabel('email'),
                        'class'       => 'span3',
                    ));
                    ?>
                </div>
                <font><?php echo $form->error($model, 'email', array('class' => 'err')); ?></font>
            </div>
            <div class="control-group">
                <?php
                echo $form->labelEx($model, 'name', array(
                    'class' => 'control-label',
                ));
                ?>
                <div class="controls">
                    <?php
                    echo $form->textField($model, 'name', array(
                        'placeholder' => $model->getAttributeLabel('name'),
                        'class'       => 'span3',
                    ));
                    ?>
                </div>
                <font><?php echo $form->error($model, 'name', array('class' => 'err')); ?></font>
            </div>
            <div class="control-group">
                <?php
                echo $form->labelEx($model, 'address', array(
                    'class' => 'control-label',
                ));
                ?>
                <div class="controls">
                    <?php
                    echo $form->textField($model, 'address', array(
                        'placeholder' => $model->getAttributeLabel('address'),
                        'class'       => 'span3',
                    ));
                    ?>
                </div>
                <font><?php echo $form->error($model, 'address', array('class' => 'err')); ?></font>
            </div>
            <div class="control-group">
                <?php
                echo $form->labelEx($model, 'phone', array(
                    'class' => 'control-label',
                ));
                ?>
                <div class="controls">
                    <?php
                    echo $form->textField($model, 'phone', array(
                        'placeholder' => $model->getAttributeLabel('phone'),
                        'class'       => 'span3',
                    ));
                    ?>
                </div>
                <font><?php echo $form->error($model, 'phone', array('class' => 'err')); ?></font>
            </div>
            <div class="control-group">
                <?php
                echo $form->labelEx($model, 'content', array(
                    'class' => 'control-label',
                ));
                ?>
                <div class="controls">
                    <?php
                    echo $form->textarea($model, 'content', array(
                        'class' => 'span4',
                        'rows'  => 5,
                    ));
                    ?>
                </div>
            </div>
            <?php if (CCaptcha::checkRequirements()): ?>
                <div class="control-group">
                    <label class="control-label">&ApplyFunction;</label>
                    <div class="controls">
                        <?php $this->widget('CCaptcha'); ?>
                    </div>
                </div>
                <div class="control-group">
                    <?php echo $form->labelEx($model, 'verifyCode', array('class' => 'control-label')); ?>
                    <div class="controls">
                        <?php echo $form->textField($model, 'verifyCode', array('class' => 'span3 input-contact')); ?>
                        <?php echo $form->error($model, 'verifyCode'); ?>
                    </div>
                </div>
            <?php endif; ?>
            <div class="control-group">
                <div class="controls">
                    <button type="submit" class="btn btn-primary">Đăng ký</button>
                </div>
            </div>
            <?php $this->endWidget(); ?>

        </div>
        <div class="fr colum-left mr-r-none">
            <!--box hotline-->
            <?php echo $this->renderPartial('//layouts/box_hotline') ?>
            <!-- end box hotline-->
        </div>
        <div class="clear"></div>
        <br>
    </div>
</div>
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<script type="text/javascript" src="<?php echo $this->assetDir ?>js/jquery-ui.js"></script>
<script>
    $('.datepicker').datepicker({
        dateFormat: 'dd-m-yy',
        yearRange: "-100:+0",
        changeMonth: true,
        changeYear: true,
    });
</script>
